/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package de.jonasjelten.jcalc.parser;

import de.jonasjelten.jcalc.exception.JMathematicalException;
import de.jonasjelten.jcalc.exception.JParserException;
import de.jonasjelten.jcalc.math.JNumber;
import de.jonasjelten.jcalc.mathExps.JMathExp;
import java.util.List;
import java.util.Arrays;

/**
 *
 * @author JJ
 */
public class JBernoulliParser extends JExpressionParser {
    // bernoulli b(n, p, k) = wkeit dass k aus n züge zu p treffen
    @Override
    public JMathExp parseExpression(String[] expression) throws JParserException {
        
        
        if(expression.length == 3) {
            int n, k;
            try {
                
            } catch (ArithmeticException e) {
                throw new JParserException("The first Bernoulli-argument has to be a full number.");
            }
            try {
                
            } catch (ArithmeticException e) {
                throw new JParserException("The last Bernoulli-argument has to be a full number.");
            }
            /*try {
                
            } catch (JMathematicalException ex) {
                throw new JParserException("Error in the second Parameter: "+ ex.getMessage());
            }*/

            

        } else {
            throw new JParserException("The Bernoulli-function needs 3 arguments.");
        }
        return null;
    }

    @Override
    public List<String> getExpressionAliases() {
        return Arrays.asList(new String[] {"p"});
    }

}
